home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / e / amigae21b.lha / Amiga_E_v2.1b / Sources / Examples / ReqToolsDemo.e < prev    next >
Text File  |  1992-09-02  |  1KB  |  34 lines

  1. /* Yet another demo to use other librarys from E.
  2.    Now we do some requesters from the reqtools.library.   */
  3.  
  4. MODULE 'ReqTools'
  5.  
  6. CONST FILEREQ=0,REQINFO=1
  7.  
  8. DEF colour,num=10,buf[120]:STRING,req
  9.  
  10. PROC main()
  11.   IF reqtoolsbase:=OpenLibrary('reqtools.library',37)
  12.     RtEZRequestA('Lets test that handy ReqTools library, shall we ?','Why?|Not again!|Yes! lets see that!',0,0,0)
  13.     IF (colour:=RtPaletteRequestA('Pick your colour:',0,0))=-1
  14.       RtEZRequestA('Hard to choose eh?','Damn right.',0,0,0)     /* colreq */
  15.     ELSE
  16.       RtEZRequestA('Did you really like colour \d ?','Nope|Zure!',0,[colour],0)
  17.     ENDIF
  18.     RtEZRequestA('Now for some input ...','What?',0,0,0)
  19.     RtGetLongA({num},'Enter a number:',0,0)                      /* longreq */
  20.     StrCopy(buf,'bla',ALL)
  21.     RtGetStringA(buf,100,'Enter something:',0,0)                 /* stringreq */
  22.     RtEZRequestA('Lets have that nice filerequester ...','More!more!|Boring!',0,0,0)
  23.     IF req:=RtAllocRequestA(FILEREQ,0)
  24.       buf[0]:=0
  25.       RtFileRequestA(req,buf,'Pick yo file:',0)
  26.       RtFreeRequest(req)
  27.     ENDIF
  28.     RtEZRequestA('That\as it.','Phew.',0,0,0)
  29.     CloseLibrary(reqtoolsbase)
  30.   ELSE
  31.     WriteF('Could not open reqtools.library!\n')
  32.   ENDIF
  33. ENDPROC
  34.